package com.qiang;

import java.util.ArrayList;
import java.util.Random;

public class Test09 {
    public static void main(String[] args) {
        /*ArrayList<Integer> ss = new ArrayList<>();
        Random r = new Random();
        long l = System.currentTimeMillis();

        for (int i = 0; i < 100000; i++) {
            int j = r.nextInt(1000000);

            if (j % 2 == 0 && j % 3 == 0 && j % 5 == 0) {
                ss.add(j);
            }
        }
        ss.stream().forEach(s-> System.out.println(s));
        System.out.println("========");

        long l1 = System.currentTimeMillis();
        System.out.println(l1-l);
        System.out.println('.'>='a'|'.'>='A');*/
        String s = "I loved.. Phoenix. ";
        String[] s1 = s.split(" ");
        for (int i = 0; i < s1.length; i++) {
            //System.out.println(s1[i]);
            char c = s1[i].charAt(s1[i].length() - 1);
            String substring = s1[i].substring(0, s1[i].length() - 1);
            System.out.println(substring);
            //System.out.println(c);
           /* int length = s1[i].length();
            System.out.println(length);*/
        }
    }
}
